﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo1
{
    class Program
    {
        /// <summary>
        /// 函数？方法？重用代码 
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            var result = Add(10, 20);
            Console.WriteLine($"{result}");
            result = Add(5, 20);
            Console.WriteLine($"{result}");
             result = Add(1, 20);
            Console.WriteLine($"{result}");
             result = Add(3, 20);
            Console.WriteLine($"{result}");
             result = Add(4, 20);
            Console.WriteLine($"{result}");
            Console.ReadKey();
        }

        /// <summary>
        /// 一个两数相加的方法
        /// </summary>
        /// <param name="num1"></param>
        /// <param name="num2"></param>
        /// <returns></returns>
        static int Add(int num1,int num2)
        {
            return num1 + num2;
        }
    }
}
